using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class soldier : MonoBehaviour
{
    public float Health;
    [Header("通信平台")]
    public GameObject UdpPlatform;
    // 哪个玩家
    public int PlayerId;
    public int gridId;
    public Vector3 localPos;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    void OnDestroy()
    {
        if(PlayerId==UdpPlatform.GetComponent<WebSocketDemo>().PlayerId)
        {
            UdpPlatform.GetComponent<WebSocketDemo>().playerBag[gridId]=0;
        }
        
    }
}
